package com.marktotop.learnone.service;

import com.marktotop.learnone.mapper.BookMapper;
import com.marktotop.learnone.mapper.UserMapper;

/**
 * @author WXLD
 * @data 2021/4/18 - 10:20
 */
public class UserServiceImpl implements UserService {


    private String username;
    private String pwd;

    private UserMapper userMapper;
    private BookMapper bookMapper;


    public void setUserMapper(UserMapper userMapper) {
        this.userMapper = userMapper;
    }

    public void setBookMapper(BookMapper bookMapper) {
        this.bookMapper = bookMapper;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    @Override
    public void save() {
        System.out.println("User Service Run...."+"username:"+username+",password:"+pwd);
        userMapper.insertIntotable();
        bookMapper.book();
    }
}
